package lesson.c3;

public class Line extends Shape {
	public Point p0;
	
	public Point p1;
	
	public Line(Point p0, Point p1){
		this.p0 = p0;
		this.p1 = p1;
	}
	
	public double length(){
		return Math.sqrt(( p1.x - p0.x ) * ( p1.x - p0.x ) +  ( p1.y - p0.y ) * ( p1.y - p0.y ));
	}
	
	public void whoAmI(){
		System.out.println("I am Line");
	}
	
	public void whoAmI(String name){
		System.out.println("I am Line::" + name);
	}
	
	public int whoAmI(String name, int type){
		System.out.println("I am Line::" + name + ": Return " + type);
		return type;
	}
}
